package cn.wanghaomiao.model;

import cn.wanghaomiao.seimi.annotation.Xpath;

/**
 * Xpath语法可以参考 http://jsoupxpath.wanghaomiao.cn/
 * 
 * @author 汪浩淼 et.tw@163.com
 * @since 2015/10/27.
 * @mod dairymix@126.com
 */
public class HouseInfo_58 {

    @Xpath("//div[@class='bigtitle']/allText()")
    private String title;// 标题
    
    //@Xpath("//*[@class='col_sub_sumary']/*[@class='suUl']/li[1]/div[2]/allText()")
    @Xpath("//*[@class='suUl']/li[1]/div[2]/allText()")
    private String price;// 价格

    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[2]/div[2]/span[2]/text()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[2]/div[@class='su_con']/span[2]/text()")
    //@Xpath("//*[@class='suUl']/li[2]/div[2]/span[2]/text()")
//    @Xpath("//div[text()*='房贷']/li[parent::*]/div[2]/span[2]/text()")
    @Xpath("//div[text()*='房贷']/parent::*/div[2]/span[2]/text()")
    private String downPayment;// 首付

    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[2]/div[2]/span[3]/text()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[2]/div[@class='su_con']/span[3]/text()")
    //@Xpath("//*[@class='suUl']/li[2]/div[2]/span[3]/text()")
    @Xpath("//div[text()*='房贷']/parent::*/div[2]/span[3]/text()")
    private String monthlyPayment;// 月供

    //@Xpath("//h1[@class='postTitle']/a/text()|//a[@id='cb_post_title_url']/text()")
    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[4]/div[2]/text()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[4]/div[2]/text()")
    //@Xpath("//*[@class='suUl']/li[4]/div[2]/text()")
    @Xpath("//div[text()*='户型']/parent::*/div[2]/text()")
    private String houseType;// 户型

    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[5]/allText()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[5]/allText()")
    //@Xpath("//*[@class='suUl']/li[5]/allText()")
    @Xpath("//div[text()*='位置']/parent::*/allText()")
    private String position;// 位置

    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[6]/div[2]/text()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[6]/div[2]/text()")
    //@Xpath("//*[@class='suUl']/li[6]/div[2]/text()")
    @Xpath("//div[text()*='地址']/parent::*/div[2]/allText()")
    private String address;// 地址

    //@Xpath("//*[@id='main']/div[1]/div[2]/div[2]/ul/li[8]/div[2]/allText()")
    //@Xpath("//div[@class='col_sub_sumary']/ul/li[8]/div[2]/allText()")
    //@Xpath("//*[@class='suUl']/li[8]/div[2]/allText()")
    @Xpath("//div[text()*='联系人']/parent::*/div[2]/allText()")
    private String contacter;// 联系人

    @Xpath("//*[@id='t_phone']/child::*/node()")
    private String phoneNumber;// 电话图片

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[1]/ul/li[2]/text()")
    private String houseForm;// 住宅类别

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[1]/ul/li[4]/text()")
    private String fitment;// 装修程度

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[2]/ul/li[2]/text()")
    private String houseProperty;// 房屋类型

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[2]/ul/li[4]/text()")
    private String houseStructure;// 建筑结构

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[3]/ul/li[2]/text()")
    private String buildingAge;// 建造年代

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[3]/ul/li[4]/text()")
    private String houseFloor;// 房屋楼层

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[4]/ul/li[2]/text()")
    private String equity;// 产权

    @Xpath("//*[@id='fyms']/div[1]/div/ul/li[4]/ul/li[4]/text()")
    private String aspect;// 朝向

    @Xpath("//*[@id='fyms']/div[2]/div[1]/article/allText()")
    private String description;// 描述

    private String href;// 源地址

//    @Xpath("//div[@id='content']/section[@id='main']/allText()")
//    private String content;//全部信息

//    @Xpath("//div[@id='content']/section[@id='main']/node()")
//    private String nodes;//全部节点
    
//    @Override
//    public String toString() {
//        if (StringUtils.isNotBlank(content) && content.length() > 100) {
//            // 方便查看截断下
//            this.content = StringUtils.substring(content, 0, 100) + "...";
//        }
//        return ToStringBuilder.reflectionToString(this);
//    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getDownPayment() {
        return downPayment;
    }

    public void setDownPayment(String downPayment) {
        this.downPayment = downPayment;
    }

    public String getMonthlyPayment() {
        return monthlyPayment;
    }

    public void setMonthlyPayment(String monthlyPayment) {
        this.monthlyPayment = monthlyPayment;
    }

    public String getHouseType() {
        return houseType;
    }

    public void setHouseType(String houseType) {
        this.houseType = houseType;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContacter() {
        return contacter;
    }

    public void setContacter(String contacter) {
        this.contacter = contacter;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getHouseForm() {
        return houseForm;
    }

    public void setHouseForm(String houseForm) {
        this.houseForm = houseForm;
    }

    public String getFitment() {
        return fitment;
    }

    public void setFitment(String fitment) {
        this.fitment = fitment;
    }

    public String getHouseProperty() {
        return houseProperty;
    }

    public void setHouseProperty(String houseProperty) {
        this.houseProperty = houseProperty;
    }

    public String getHouseStructure() {
        return houseStructure;
    }

    public void setHouseStructure(String houseStructure) {
        this.houseStructure = houseStructure;
    }

    public String getBuildingAge() {
        return buildingAge;
    }

    public void setBuildingAge(String buildingAge) {
        this.buildingAge = buildingAge;
    }

    public String getHouseFloor() {
        return houseFloor;
    }

    public void setHouseFloor(String houseFloor) {
        this.houseFloor = houseFloor;
    }

    public String getEquity() {
        return equity;
    }

    public void setEquity(String equity) {
        this.equity = equity;
    }

    public String getAspect() {
        return aspect;
    }

    public void setAspect(String aspect) {
        this.aspect = aspect;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

//    public String getContent() {
//        return content;
//    }

//    public void setContent(String content) {
//        this.content = content;
//    }

//    public String getNodes() {
//        return nodes;
//    }

//    public void setNodes(String nodes) {
//        this.nodes = nodes;
//    }

}
